﻿using System;

namespace NetAssist.Collections
{
  /// <summary>
  /// The exception that is thrown when the buffers is full and a new item is inserted.
  /// </summary>
  /// <typeparam name="T">Specifies the type of elements in the Buffer</typeparam>
  public class BufferOverflowEventArgs<T> : EventArgs
  {
    /// <summary>
    /// Initializes a new instance of the System.ArgumentOutOfRangeException class with the item that got forced out of the buffer.
    /// </summary>
    /// <param name="item">The item that got forced out of the buffer.</param>
    public BufferOverflowEventArgs(T item)
    {
      this.Item = item;
    }

    /// <summary>
    /// Gets the items that got forced out of the buffer.
    /// </summary>
    public T Item { get; private set; }
  }
}
